<%@ page language="java" contentType="text/html; charset=UTF-8"
         pageEncoding="UTF-8" %>
<%@taglib prefix="s" uri="/struts-tags" %>
<% String adminName = request.getParameter("adminName");%>
<%
    String path = request.getContextPath();
    String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + path + "/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
    <base href="<%=basePath%>">
    <title>安排订单</title>
    <meta http-equiv="pragma" content="no-cache">
    <meta http-equiv="cache-control" content="no-cache">
    <meta http-equiv="expires" content="0">
    <meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
    <meta http-equiv="description" content="This is my page">
    <link rel="stylesheet" type="text/css" href="css/arrangeRoom.css">
    <link type="text/css" rel="stylesheet" href="css/smartmenu.css">
    <script type="text/javascript" src="<%=basePath%>/jslib/index/jquery-1.3.2.min.js"></script>
    <script type="text/javascript" src="<%=basePath%>/jslib/index/smartmenu-min.js"></script>
    <script type="text/javascript" src="<%=basePath%>/jslib/Menu.js"></script>
    <script type="text/javascript">
        $(document).ready(function () {
            var form1 = $("#show");
            var form2 = $("#form1");
            var form3 = $("#form2");
            var order = $("#orderId").val();
            if ($("#roomId").val() == null) {
                form1.css("display", "none");
                form2.css("display", "none");
                form3.css("display", "none");
                if (order != "") {
                    form1.css("display", "block");
                    form2.css("display", "block");
                }
            }
        });
    </script>

</head>

<body>
<%@ include file="/page/share/menu.jsp" %>
<div id="content">
<form action="RoomUsed.action" method="post" id="select">
    <table>
        <thead>
        <tr>
            <td align="right">
                请输入订单相关信息：
            </td>
            <td align="center">
                <input type="text" name="orderId" size="14" class="input">
                <input type="hidden" name="flag" value="1">
                <input type="submit" name="submit" value="确认" id="stb" class="btn">

            </td>
        </tr>
        </thead>
    </table>
</form>
<form method="post" action="" id="show">
    <table align="center" border="1" cellspacing="0">
        <thead align="center">
        <tr>
            <td>
                订单编号
            </td>
            <td>
                创建时间
            </td>
            <td>
                预约客户姓名
            </td>
            <td>
                预约唱K时间
            </td>
            <td>
                预计结束唱K时间
            </td>
            <td>
                联系电话
            </td>
            <td>
                人数
            </td>
            <td>
                地址
            </td>
        </tr>
        </thead>
        <s:iterator value="order" var="b">
            <tr>
                <td>
                    <s:property value="#b.orderId"/>
                </td>
                <td>
                    <s:property value="#b.createDate"/>
                </td>
                <td>
                    <s:property value="#b.name"/>
                </td>
                <td>
                    <s:property value="#b.beginTime"/>
                </td>
                <td>
                    <s:property value="#b.endTime"/>
                </td>

                <td>
                    <s:property value="#b.tel"/>
                </td>
                <td>
                    <s:property value="#b.singerNum"/>
                </td>
                <td>
                    <s:property value="#b.address"/>
                </td>
            </tr>
        </s:iterator>
    </table>
</form>
<form action="RoomUsed!arrangeRoom.action" method="post" id="form1">
    <input type="hidden" name="orderId" value="<s:property value="#b.orderId"/>" id="orderId"/>
    <table align="center">
        <thead align="center">
        <tr>
            <td>
                实际人数<label>
                <input type="text" name="singerNum"/>
            </label>
                <input type="submit" name="submit" value="分配房间" id="allot">
            </td>
        </tr>
        </thead>
    </table>
</form>

<form action="RoomUsed!arrangeRoom.action" method="post" id="form2">
    <table align="center" border="1" cellspacing="0" id="first">
        <thead align="center">
        <h4 style="margin-left: 45%">选择房间:</h4>
        <tr>
            <td>
                &nbsp;
            </td>
            <td>
                房间号
            </td>
            <td>
                房间类型
            </td>
            <td>
                房间大小
            </td>
        </tr>
        <s:iterator value="rooms" var="room" id="room">
            <tr>
                <td>
                    <label>
                        <input type="radio" value="<s:property value="#room.roomId"/>" name="roomId" id="roomId"
                               checked="checked"/>
                    </label>
                </td>
                <td>
                    <s:property value="#room.roomId"/>
                </td>
                <td>
                    <s:property value="#room.roomStyle"/>
                </td>
                <td>
                    <s:property value="#room.size"/>
                </td>
            </tr>
        </s:iterator>
        </thead>
    </table>

    <table align="center" border="1" cellspacing="0" id="second">
        <thead align="center">
        <h4 style="margin-left: 45%">选择套餐:</h4>
        <tr>
            <td>
                &nbsp;
            </td>
            <td>
                序号
            </td>
            <td>
                套餐名称
            </td>
            <td>
                节假日
            </td>
            <td>
                开始时间
            </td>
            <td>
                结束时间
            </td>
            <td>
                情侣房价格
            </td>
            <td>
                标准房价格
            </td>
            <td>
                中房价格
            </td>
            <td>
                大房价格
            </td>
            <td>
                VIP房价格
            </td>
        </tr>
        <s:iterator value="meals" var="m" status="n">
            <tr>
                <td>
                    <label>
                        <input type="radio" value="<s:property value="#m.mealId"/>" name="meal" checked="checked"/>
                    </label>
                </td>
                <td>
                    <s:property value="#n.index+1"/>
                </td>
                <td>
                    <s:property value="#m.mealName"/>
                    &nbsp;
                </td>
                <td>
                    <s:property value="#m.holiday"/>
                    &nbsp;
                </td>
                <td>
                    <s:property value="#m.beginTime"/>
                    &nbsp;
                </td>
                <td>
                    <s:property value="#m.endTime"/>
                    &nbsp;
                </td>
                <td>
                    <s:property value="#m.coupleRoomPrice"/>
                    &nbsp;
                </td>
                <td>
                    <s:property value="#m.standardRoomPrice"/>
                    &nbsp;
                </td>
                <td>
                    <s:property value="#m.middleRoomPrice"/>
                    &nbsp;
                </td>
                <td>
                    <s:property value="#m.bigRoomPrice"/>
                    &nbsp;
                </td>
                <td>
                    <s:property value="#m.vipRoomPrice"/>
                    &nbsp;
                </td>
            </tr>
        </s:iterator>
        <tr>
            <td colspan="11" id="submit">
                <%--  预计结束时间：<input type="text" name="endTime">--%>
                <input type="submit" name="submit" value="提交订单">
                <input type="hidden" name="singerNum" value="${singerNum}">
                <input type="hidden" name="orderId" value="${orderId}">
                <%--   <input type="hidden" name="meal" value="${mealId}">--%>
                <input type="hidden" name="flag" value="1">
            </td>
        </tr>
        </thead>
    </table>
</form>
</div>
<div id="bottom"></div>
</body>
</html>